    void initWebServer() {
    //Serve the HTML page to client when they go to the root path.
    server.on("/", HTTP_GET, serveInitialPage);
    //Setup other endpoints.
    //server.on("/toggleLED", HTTP_GET, toggleLED);
    server.on("/updateStations", HTTP_POST, updateStations);
    //Start web server.
    server.begin();
  }
  
  void serveInitialPage() {
    server.send(200, "text/html", processPageVars(String(WEBPAGE)));
  }
  
  String processPageVars(String pageContent)
  {
    pageContent.replace("@Stations",stations);
    return pageContent;
  }
  
  void updateStations() {
    // Get POST data
    String requestBody = server.arg(0);
    
    // Parse JSON more efficiently
    DynamicJsonDocument doc(2048);
    DeserializationError error = deserializeJson(doc, requestBody);
    
    if (error) {
      server.send(400, "text/plain", "Invalid JSON");
      return;
    }
  
    // Update stations
    stations = doc["txt1"].as<String>();
    saveStations();
  
    // Prepare response
    JsonDocument responseDoc;
    responseDoc["value"] = volume;
    
    String response;
    serializeJson(responseDoc, response);
    server.send(200, "application/json", response);
  }